.class public abstract Les/cb;
.super Ljava/io/OutputStream;
.source "CompressorStream.java"


# instance fields
.field protected a:Lcom/esfile/screen/recorder/picture/pngj/a;

.field public final b:I

.field public final c:J

.field d:Z

.field protected e:Z

.field protected f:J

.field protected g:J

.field protected h:I

.field private i:[B

.field protected j:Z


# direct methods
.method public constructor <init>(Lcom/esfile/screen/recorder/picture/pngj/a;IJ)V
    .locals 4

    .line 1
    invoke-direct {p0}, Ljava/io/OutputStream;-><init>()V

    const/4 v0, 0x0

    .line 2
    iput-boolean v0, p0, Les/cb;->d:Z

    .line 3
    iput-boolean v0, p0, Les/cb;->e:Z

    const-wide/16 v1, 0x0

    .line 4
    iput-wide v1, p0, Les/cb;->f:J

    .line 5
    iput-wide v1, p0, Les/cb;->g:J

    const/4 v3, -0x1

    .line 6
    iput v3, p0, Les/cb;->h:I

    .line 7
    iput-boolean v0, p0, Les/cb;->j:Z

    .line 8
    iput-object p1, p0, Les/cb;->a:Lcom/esfile/screen/recorder/picture/pngj/a;

    if-gez p2, :cond_0

    const/16 p2, 0x1000

    :cond_0
    cmp-long p1, p3, v1

    if-gez p1, :cond_1

    const-wide p3, 0x7fffffffffffffffL

    :cond_1
    const/4 p1, 0x1

    if-lt p2, p1, :cond_2

    const-wide/16 v0, 0x1

    cmp-long p1, p3, v0

    if-ltz p1, :cond_2

    .line 9
    iput p2, p0, Les/cb;->b:I

    .line 10
    iput-wide p3, p0, Les/cb;->c:J

    return-void

    .line 11
    :cond_2
    new-instance p1, Ljava/lang/RuntimeException;

    const-string p2, " maxBlockLen or totalLen invalid"

    invoke-direct {p1, p2}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V

    throw p1
.end method


# virtual methods
.method public abstract b()V
.end method

.method public abstract b([BII)V
.end method

.method public close()V
    .locals 1

    .line 1
    invoke-virtual {p0}, Les/cb;->b()V

    .line 2
    iget-object v0, p0, Les/cb;->a:Lcom/esfile/screen/recorder/picture/pngj/a;

    if-eqz v0, :cond_0

    .line 3
    invoke-virtual {v0}, Lcom/esfile/screen/recorder/picture/pngj/a;->a()V

    :cond_0
    const/4 v0, 0x1

    .line 4
    iput-boolean v0, p0, Les/cb;->d:Z

    return-void
.end method

.method public write(I)V
    .locals 2

    const/4 v0, 0x1

    new-array v0, v0, [B

    int-to-byte p1, p1

    const/4 v1, 0x0

    aput-byte p1, v0, v1

    .line 1
    invoke-virtual {p0, v0}, Les/cb;->write([B)V

    return-void
.end method

.method public final write([B)V
    .locals 2

    .line 2
    array-length v0, p1

    const/4 v1, 0x0

    invoke-virtual {p0, p1, v1, v0}, Les/cb;->write([BII)V

    return-void
.end method

.method public final write([BII)V
    .locals 2

    .line 3
    iget v0, p0, Les/cb;->h:I

    add-int/lit8 v0, v0, 0x1

    iput v0, p0, Les/cb;->h:I

    .line 4
    iget v0, p0, Les/cb;->b:I

    if-gt p3, v0, :cond_0

    .line 5
    invoke-virtual {p0, p1, p2, p3}, Les/cb;->b([BII)V

    .line 6
    iget-boolean p3, p0, Les/cb;->j:Z

    if-eqz p3, :cond_1

    iget p3, p0, Les/cb;->h:I

    iget-object v0, p0, Les/cb;->i:[B

    array-length v1, v0

    if-ge p3, v1, :cond_1

    .line 7
    aget-byte p1, p1, p2

    aput-byte p1, v0, p3

    goto :goto_1

    :cond_0
    :goto_0
    if-lez p3, :cond_1

    .line 8
    iget v0, p0, Les/cb;->b:I

    invoke-virtual {p0, p1, p2, v0}, Les/cb;->b([BII)V

    .line 9
    iget v0, p0, Les/cb;->b:I

    add-int/2addr p2, v0

    sub-int/2addr p3, v0

    goto :goto_0

    .line 10
    :cond_1
    :goto_1
    iget-wide p1, p0, Les/cb;->f:J

    iget-wide v0, p0, Les/cb;->c:J

    cmp-long p3, p1, v0

    if-ltz p3, :cond_2

    .line 11
    invoke-virtual {p0}, Les/cb;->b()V

    :cond_2
    return-void
.end method
